//获取app实例
var app = getApp();
Page({
  data: {
    navList: [],
    status: 0
  },
  onLoad(option){
	  console.log("onLoad");
	  console.log(option);
	  
	  //发送请求获取数据
	  var that = this;
	  app.request('/index/cate', {}, function(data, ret) {
	    console.log(data);
	  		that.setData({
	  			navList: data.cateList
	  		});
	  }, function(data, ret) {
	    that.error(ret.msg);
	  });
	  
	  this.setData({
	  	status:option.id
	  });
  },
  onShow(){
	  console.log("onShow");
  },
  getStatus(e) {
    this.setData({ status: e.currentTarget.dataset.index })
  }
})
